#ifndef ADDMODIFYSTAFFINFORMATION_H
#define ADDMODIFYSTAFFINFORMATION_H

#include <QWidget>
#include "personstaffinformation.h"

class Calendar;
class InquireSql;

namespace Ui {
class AddModifyStaffInformation;
}

enum StaffInformationPage{addStaffInformationPage, modifyStaffInformationPage};

class AddModifyStaffInformation : public QWidget
{
    Q_OBJECT
    
public:
    explicit AddModifyStaffInformation(QWidget *parent = 0);
    ~AddModifyStaffInformation();
    bool eventFilter(QObject *target, QEvent *event);

    enum LastClickAddModifyStaffInformation {lineEditStaffID = 2, lineEditName,
                comboBoxGender, lineEditBirthday, lineEditEntryDate,
                lineEditAge, lineEditWage, lineEditTel, lineEditAddress,
                textEditRemark, pushButtonSave};
//    enum LineEditDate{lineEditBirthday = 13, lineEditEntryDate};
    
public slots:
     void slotDisplayAddModifyStaffInformation(int, int);

signals:
     void signalDisplayStaffInformation();

private slots:
    void on_pushButtonCancel_clicked();

    void on_pushButtonSave_clicked();

    void on_pushButtonAutoAddStaffID_clicked();

    void slotUpdateLineEditDate(QString);

private:
    void clearStaffInformation();
    bool staffInformationIsEmpty(QString, QString);
    Ui::AddModifyStaffInformation *ui;

    Calendar *m_calendar;

    staffInformationList m_list;

    InquireSql *m_sql;

    int currentPage;

    int m_lastClick;

    int m_LineEditDate;

    int m_staffID;
};

#endif // ADDMODIFYSTAFFINFORMATION_H
